from fastapi import FastAPI
from fastapi.responses import HTMLResponse
import uvicorn

app = FastAPI(
    title="{{project.name}}",
    description="{{project.description}}",
    version="{{project.version}}"
)

@app.get("/", response_class=HTMLResponse)
async def root():
    return """
    <html>
        <head>
            <title>{{project.name}}</title>
        </head>
        <body>
            <h1>Hello FastAPI!</h1>
            <p>Welcome to {{project.name}}</p>
            <p><a href="/docs">API Documentation</a></p>
        </body>
    </html>
    """

@app.get("/api/hello")
async def hello():
    return {"message": "Hello, World!", "project": "{{project.name}}"}

@app.get("/api/health")
async def health_check():
    return {"status": "healthy"}

if __name__ == "__main__":
    uvicorn.run(app, host="0.0.0.0", port=8000, reload=True)